﻿var GetCacheNav;
function changeNav(obj_nav,mainPage){
	if(GetCacheNav!=null){
		GetCacheNav.className = "";
	}
	obj_nav.className = "current";
	GetCacheNav = obj_nav;
	document.getElementById("mainfrm").src=mainPage;
	
}


function _auto_height(){

if(window.document.readyState=="complete"){
	try{

            var headerH=parseInt(document.styleSheets[0].rules[0].style.height); 
            
            var footerH=parseInt(document.styleSheets[0].rules[1].style.height); 

            var masterH=parseInt(document.getElementById("master").clientHeight); 

            document.getElementById("content").style.height=masterH-headerH-footerH;
    }catch(e){}
	}
	
}

/*commom*/

function toggle(menu_title_id,img_id){	
	var id = document.getElementById(menu_title_id) ;
	var imgid = document.getElementById(img_id) 
	var srcstr = imgid.src;
	var splitstr;
	splitstr=srcstr.split(".gif");
	valuestr=splitstr[0].substring(0,splitstr[0].length-1);

	if(id.style.display!="none")
	{					
		id.style.display="none";	
		imgid.src=valuestr+"c.gif";
	}
	else
	{				
		id.style.display="block";
		imgid.src=valuestr+"o.gif";
		
	}
}

